package com.imooc.pattern;

import lombok.extern.slf4j.Slf4j;

@Slf4j
public class ProxyServer implements ProxyInterface{

    private TargetServer targetServer;

    public ProxyServer(TargetServer targetServer){
        this.targetServer = targetServer;
    }

    @Override
    public void request() {
        try{
            targetServer.request();
        }catch (Exception e){
            log.error("",e);
        }finally {

        }
    }

    @Override
    public void hello() {
        targetServer.hello();
    }
}
